package com.huluobo.module_travel_policy.bean

import com.huluobo.module_travel_policy.bean.enum.RiskLevelEnum

/**
 * 出行政策查询的bean
 * province_id	stirng	省份ID
province_name	stirng	省份名称
city_id	stirng	城市ID
city_name	stirng	城市名称
health_code_desc	stirng	健康码描述
health_code_gid	stirng	健康码使用教程链接
health_code_name	stirng	健康码名称
health_code_picture	stirng	健康码图片
health_code_style	stirng	健康码类型,0:小程序 1:二维码，其他：未知
high_in_desc	stirng	高风险地区，进入政策描述
low_in_desc	stirng	低风险地区，进入政策描述
out_desc	stirng	出行政策描述
risk_level	stirng	风险等级，0:暂无 1:低风险 2:中风险 3:高风险 4:部分地区中风险 5:部分地区高风险 6:部分地区中、高风险
 */
class PolicyDetailReqBean {
    var province: String? = null
    var province_name: String? = null
    var city_id: String? = null
    var city_name: String? = null
    var health_code_desc: String? = null
    var health_code_gid: String? = null
    var health_code_name: String? = null
    var health_code_style: String? = null
    var high_in_desc: String? = null
    var low_in_desc: String? = null
    var out_desc: String? = null
    var risk_level: String? = null
    var health_code_picture: String? = null

    val isLowRisk: Boolean
        get() {
            risk_level?.let {
                if (it == "0" || it == "1") {
                    return true
                }
            }
            return false
        }

    val riskLevelDesc: String
        get() {
            risk_level?.let {
                return RiskLevelEnum.getRiskLevelDesc(it)
            }
            return "未知"
        }
}